home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_nub_hint2.cog < prev    next >
Text File  |  1999-11-15  |  13KB  |  585 lines

  1.  
  2. # Jones 3D Cog Script
  3. #
  4. # nub_hint2.cog
  5. #
  6. # Hint Script
  7. #
  8. # [GGJ]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. #
  12. # ========================================================================================
  13. symbols
  14.  
  15. message        startup
  16. message        activated
  17. message        touched
  18. message        entered
  19. message        exited
  20. message        arrived
  21. message        damaged
  22. message        killed
  23. message        user0
  24. message        user1
  25. message        user2
  26. message        user3
  27. message        user4
  28. message        user5
  29. message        user6
  30. message        user7
  31.  
  32. thing        hint1        #jump to shimmy ledge above rubble
  33. thing        hint2        #drop to hallway and pass sarcophagi
  34. thing        hint3        #examing statue with missing arm
  35. thing        hint4        #cut torn tapestry behind pushable statue
  36. thing        hint5        #pull lever to raise door
  37. thing        hint6        #pull block out of hallway behind slashable tapestry
  38. thing        hint7        #jump to bottom of unbroken ladder on right
  39. thing        hint8        #push button to bring out statue in chapel
  40. thing        hint9        #drop to platform across from arm
  41. thing        hint10        #take arm (hint moves with arm when whipped)
  42. thing        hint11        #get to hallway (same as hint2)
  43. thing        hint12        #place arm on statue
  44.  
  45. thing        hint13        #use imp3 to climb to top
  46. thing        hint14        #push upper stair button, bringing in commies
  47. thing        hint15        #push upper stair button again to lower stairs
  48. thing        hint16        #push lower stair button to gain access to maze
  49. thing        hint17        #push lower maze block to trap Dr.V
  50. thing        hint18        #push block B to trap Dr.V
  51. thing        hint19        #trap Dr.V and take gear
  52. thing        hint20        #approach pull block behind slashable tapestry
  53. thing        hint21        #jump to opening
  54. thing        hint22        #pull lever to raise door
  55. thing        hint23        #go behind block
  56. thing        hint24        #take key
  57. thing        hint25        #use key on gate to open door
  58. thing        hint26        #place gear on elevator
  59. thing        hint27        #push block onto elevator
  60. thing        hint28        #swing onto block
  61.  
  62. thing        hint29        #climb out of elevator bottom to "bridge" area
  63. thing        hint30        #pull underwater switch to raise bull
  64. thing        hint31        #jump across bull
  65. thing        hint32        #whipclimb to upper lab perimeter
  66. thing        hint33        #hallway to imp3 to lab top
  67. #thing        hint34        #move block A to center
  68. #thing        hint35        #move block b to center
  69. #thing        hint36        #move block c to center
  70. thing        hint37        #raise ball
  71. thing        hint38        #push switch A once                             
  72. thing        hint39        #push switch B twice                            
  73. thing        hint40        #jump into pool
  74. thing        hint41        #climb to top of tower and take imp4
  75. thing        hint42        #use imp4 to open drawbridge
  76. thing        hint43        #use imp4 to open shortcut back to elevator bottom
  77. thing        hint44        #use imp4 to power elevator                      
  78. thing        hint45        #pull block off of elevator
  79. thing        hint46        #push elevator button to ascend to top
  80.  
  81. thing        hint47        #use imp4 to open door
  82. thing        hint48        #open casket
  83. thing        hint49        #use imp4 to rotate Nub
  84. thing        hint50        #take eye
  85. thing        hint51        #place eye on robot
  86. thing        hint52        #robot boss (solved upon boss death)
  87. thing        hint53        #push button to lower bridge
  88.  
  89. thing        player            local
  90.  
  91. surface        rubbleShimmySurf
  92. surface        overBullSurf
  93. surface        aboveLabClimbSurf
  94. surface        slashTap                mask=0x8
  95. surface        lowerPad                mask=0x480
  96.  
  97. sector        sarcHallSect
  98. sector        behindBlockSect
  99. sector        ladderSect
  100. sector        aboveJewelSect
  101. sector        keySect
  102. sector        openTapSect
  103. sector        bridgeSect
  104. sector        imp3HallSect
  105. sector        poolPulloutSect
  106. sector        lowerSolveSec0            mask=0x480
  107. sector        lowerSolveSec1            mask=0x480
  108.  
  109. thing        whipPlatform
  110. thing        counterweight
  111. thing        elevatorCharger            mask=0x8
  112. thing        robotDoorCharger        mask=0x8
  113. thing        sarcCharger                mask=0x8
  114. thing        storageDoor
  115. thing        drawbridge
  116. thing        shortcutDoor
  117. thing        upperStairButton
  118. thing        lowerStairButton
  119. thing        crocLever
  120. thing        key
  121. thing        lock
  122. thing        turtle
  123. thing        bullSwitch
  124. thing        ballSwitch
  125. thing        h20SwitchA
  126. thing        h20SwitchB
  127. thing        imp4
  128. thing        arm
  129. thing        armitem
  130. thing        elevButton
  131. thing        nubSarc
  132. thing        bossHead
  133. thing        exitSwitch
  134. thing        noArmGuy
  135. thing        boss
  136.  
  137. int            gotArm=0        local
  138. int            keyOnce=0        local
  139. int            sarcOpen=0        local
  140. int            buttonOnce=0    local
  141. int            blockCorrect=0    local
  142. int            volCaught=0        local
  143. int            ballup=0        local
  144. int            buttonApush=0    local
  145. int            buttonBpush=0    local
  146.  
  147. thing        volodnikov
  148. thing        storageBlock
  149. thing        labTopBlockL
  150. thing        labTopBlockC
  151. thing        labTopBlockR
  152. thing        lowerMazeBlock
  153. thing        lowerMazeBlock2
  154. thing        upperMazeBlock
  155. thing        elevatorBlock
  156.  
  157. end
  158.  
  159. # ========================================================================================
  160. code
  161. startup:
  162. player = GetLocalPlayerThing();
  163. AttachThingToThing(hint6, storageBlock);
  164. #AttachThingToThing(hint34, labTopBlockL);
  165. #AttachThingToThing(hint35, labTopBlockC);
  166. #AttachThingToThing(hint36, labTopBlockR);
  167. AttachThingToThing(hint17, lowerMazeBlock);
  168. AttachThingToThing(hint18, upperMazeBlock);
  169. AttachThingToThing(hint27, elevatorBlock);
  170. AttachThingToThing(hint45, elevatorBlock);
  171. #AttachThingToThing(hint52, boss);
  172. AttachThingToThing(hint19, Volodnikov);
  173. #AttachThingToThing(hint10, arm);
  174.  
  175. return;
  176.  
  177. # ........................................................................................
  178. exited:
  179. if (((GetSourceRef() == lowerMazeBlock) || (GetSourceRef() == lowerMazeBlock2)) && (GetSenderRef() == lowerPad))
  180. {
  181.     if (VolCaught == 1) return;
  182.     SetHintUnSolved(hint17);
  183.     return;
  184. }
  185. if ((GetSourceRef() == upperMazeBlock) && ((GetSenderRef() == lowerSolveSec0) || (GetSenderRef() == lowerSolveSec1)))
  186. {
  187.     if (VolCaught == 1) return;
  188.     SetHintUnSolved(hint18);
  189.     return;
  190. }
  191.  
  192. return;
  193. # ........................................................................................
  194. entered:
  195. PRINT("entered");
  196. if (((GetSourceRef() == lowerMazeBlock) || (GetSourceRef() == lowerMazeBlock2)) && (GetSenderRef() == lowerPad))
  197. {
  198.     if (VolCaught == 1) return;
  199.     SetHintSolved(hint17);
  200.     return;
  201. }
  202.  
  203. if ((GetSourceRef() == upperMazeBlock) && ((GetSenderRef() == lowerSolveSec0) || (GetSenderRef() == lowerSolveSec1)))
  204. {
  205.     SetHintSolved(hint18);
  206. #AttachThingToThing(hint19, Volodnikov);
  207. }
  208.  
  209.  
  210. if (GetSenderRef() == rubbleShimmySurf)
  211. {
  212.     SetHintSolved(hint1);
  213.     return;
  214. }
  215. if (GetSenderRef() == sarcHallSect)
  216. {
  217.     if (gotArm == 0)
  218.     {
  219.         SetHintSolved(hint2);
  220.         return;
  221.     }
  222.     else
  223.     {
  224.         SetHintSolved(hint11);
  225.         return;
  226.     }
  227.     return;
  228. }
  229. if (GetSenderRef() == behindBlockSect)
  230. {
  231.     SetHintSolved(hint6);
  232.     return;
  233. }
  234. if (GetSenderRef() == ladderSect)
  235. {
  236.     SetHintSolved(hint7);
  237.     return;
  238. }
  239. if (GetSenderRef() == whipPlatform)
  240. {
  241.     SetHintSolved(hint9);
  242.     return;
  243. }
  244. if (GetSenderRef() == aboveJewelSect)
  245. {
  246.     SetHintSolved(hint13);
  247.     return;
  248. }
  249. if (GetSenderRef() == keySect)
  250. {
  251.     if (keyOnce == 0)
  252.     {
  253.         SetHintSolved(hint20);
  254.         keyOnce = 1;
  255.         return;
  256.     }
  257.     else
  258.     {
  259.         SetHintSolved(hint23);
  260.         return;
  261.     }
  262. }
  263. if (GetSenderRef() == openTapSect)
  264. {
  265.     SetHintSolved(hint21);
  266.     return;
  267. }
  268. if (GetSenderRef() == counterWeight)
  269. {
  270.     SetHintSolved(hint28);
  271.     return;
  272. }
  273. if (GetSenderRef() == bridgeSect)
  274. {
  275.     SetHintSolved(hint29);
  276.     return;
  277. }
  278. if (GetSenderRef() == overBullSurf)
  279. {
  280.     SetHintSolved(hint31);
  281.     return;
  282. }
  283. if (GetSenderRef() == aboveLabClimbSurf)
  284. {
  285.     SetHintSolved(hint32);
  286.     return;
  287. }
  288. if (GetSenderRef() == imp3HallSect)
  289. {
  290.     SetHintSolved(hint33);
  291.     return;
  292. }
  293. if (GetSenderRef() == poolPulloutSect)
  294. {
  295.     SetHintSolved(hint40);
  296.     return;
  297. }
  298. return;
  299.  
  300.  
  301. # ........................................................................................
  302. damaged:
  303. if ((GetSenderRef() == slashTap) && (GetParam(1) == 0x20))
  304. {
  305.     SetHintSolved(hint4);
  306.     return;
  307. }
  308. if ((GetSenderRef() == elevatorCharger) && (GetParam(1) == 0x4000))
  309. {
  310.     SetHintSolved(hint44);
  311.     SetHintSolved(hint43);
  312.     SetHintSolved(hint42);
  313.     return;
  314. }
  315. if ((GetSenderRef() == robotDoorCharger) && (GetParam(1) == 0x4000))
  316. {
  317.     SetHintSolved(hint47);
  318.     return;
  319. }
  320. if ((GetSenderRef() == SarcCharger) && (GetParam(1) == 0x4000))
  321. {
  322. #    DEBUGPRINT("Hint 49 and 50 solved");
  323.     SetHintSolved(hint49);
  324.     SetHintSolved(hint50);
  325.     SarcOpen = 1;
  326.     return;
  327. }
  328.  
  329. return;
  330. # ........................................................................................
  331. arrived:
  332. if (GetSenderRef() == storageDoor)
  333. {
  334.     SetHintSolved(hint5);
  335.     return;
  336. }
  337. if (GetSenderRef() == drawbridge)
  338. {
  339.     SetHintSolved(hint42);
  340.     return;
  341. }
  342. if (GetSenderRef() == shortCutDoor)
  343. {
  344.     SetHintSolved(hint43);
  345.     return;
  346. }
  347.  
  348.  
  349. return;
  350.  
  351. # ........................................................................................
  352. activated:
  353. if (GetSenderRef() == upperStairButton)
  354. {
  355.     if (buttonOnce == 0)
  356.     {
  357.         buttonOnce = 1;
  358.         SetHintSolved(hint14);
  359.         return;
  360.     }
  361.     else
  362.     {
  363.         SetHintSolved(hint15);
  364.         return;
  365.     }
  366. }
  367. if (GetSenderRef() == lowerStairButton)
  368. {
  369.     SetHintSolved(hint16);
  370.     return;
  371. }
  372.  
  373. if (GetSenderRef() == crocLever)
  374. {
  375.     SetHintSolved(hint22);
  376.     return;
  377. }
  378. if (GetSenderRef() == key)
  379. {
  380.     SetHintSolved(hint24);
  381.     return;
  382. }
  383. if ((GetSenderRef() == lock) && (GetCurItem(player) == 68))
  384. {
  385.     SetHintSolved(hint25);
  386.     return;
  387. }
  388. if ((GetSenderRef() == turtle) && (GetCurItem(player) == 67))
  389. {
  390.     SetHintSolved(hint26);
  391.     return;
  392. }
  393. if (GetSenderRef() == bullSwitch)
  394. {
  395.     SetHintSolved(hint30);
  396.     return;
  397. }
  398. if (GetSenderRef() == ballSwitch)
  399. {
  400.     ballup = (1 - ballup);
  401.     if (ballup == 0)
  402.     {
  403.         SetHintUnsolved(hint37);
  404.     }
  405.     if (ballup == 1)
  406.     {
  407.         SetHintSolved(hint37);
  408.     }
  409.     return;
  410. }
  411.  
  412.  
  413.  
  414.  
  415. if (GetSenderRef() == h20SwitchA)
  416. {
  417.     if (GetCurFrame(h20SwitchA) == 1) 
  418.     {
  419.         Print("switch not in position: bailing");
  420.         return;
  421.     }
  422.     
  423.  
  424.     buttonApush = buttonApush + 1;
  425.     if (buttonApush == 1)
  426.     {
  427.         SetHintSolved(hint38);
  428.     }
  429.     if (buttonApush != 1)
  430.     {
  431.         SetHintUnSolved(hint38);
  432.     }
  433.     if (buttonApush == 4)
  434.     {
  435.         buttonApush=0;
  436.     }
  437.     return;
  438. }
  439.  
  440.  
  441. if (GetSenderRef() == h20SwitchB)
  442. {
  443.     if (GetCurFrame(h20SwitchB) == 1)
  444.     {
  445.         Print("switch not in position: bailing");
  446.         return;
  447.     }
  448.  
  449.  
  450.     buttonBpush = buttonBpush + 1;
  451.     if (buttonBpush == 3)
  452.     {    
  453.         SetHintSolved(hint39);
  454.     }
  455.     if (buttonBpush != 3)
  456.     {    
  457.         SetHintUnSolved(hint39);
  458.     }
  459.     if (buttonBpush == 4)
  460.     {    
  461.         buttonBpush = 0;
  462.     }
  463.     return;
  464. }
  465.  
  466. if (GetSenderRef() == imp4)
  467. {
  468. #    DEBUGPRINT("Solved hint 41");    
  469.     SetHintSolved(hint41);
  470.     return;
  471. }
  472.  
  473. if (GetSenderRef() == armitem)
  474. {
  475.     Print("solved hint!");
  476.     SetHintSolved(hint10);
  477.     gotArm = 1;
  478.     return;
  479. }
  480. if (GetSenderRef() == elevButton)
  481. {
  482. #    DEBUGPRINT("Solved hint 46");    
  483.     SetHintSolved(hint46);
  484.     return;
  485. }
  486. if (GetSenderRef() == nubSarc)
  487. {
  488.     if (SarcOpen == 0)
  489.     {
  490. #        DEBUGPRINT("Solved hint 48");    
  491.         SetHintSolved(hint48);
  492.         return;
  493.     }
  494.     
  495. }
  496. if (GetSenderRef() == exitSwitch)
  497. {
  498.     SetHintSolved(hint53);
  499.     return;
  500. }
  501. return;
  502.  
  503. # ........................................................................................
  504. touched:
  505. if (GetSenderRef() == noArmGuy)
  506. {
  507.     SetHintSolved(hint3);
  508.     return;
  509. }
  510. return;
  511.  
  512. # ........................................................................................
  513. #message that Indy brought the "armed" statue forward
  514. user0:
  515.     SetHintSolved(hint8);
  516.     return;
  517.  
  518. # ........................................................................................
  519. #message that Indy placed the arm.
  520. user1:
  521.     Print("placed the arm and solved Hint12");
  522.     SetHintSolved(hint12);
  523.     SetHintSolved(hint3);
  524.     return;
  525.  
  526. # ........................................................................................
  527. user2:                                #was killed:
  528.     Print("Boss dead: solved Hint52");
  529.     SetHintSolved(hint52);
  530.     return;
  531.  
  532. # ........................................................................................
  533. #message that Indy has pushed the upper volBlock into position
  534. user3:
  535.     #SetHintSolved(hint18);
  536.     #AttachThingToThing(hint19, Volodnikov);
  537.     return;
  538.  
  539. # ........................................................................................
  540. #message that Indy took the gear from Volodnikov
  541. user4:
  542.     SetHintSolved(hint19);
  543.     volCaught=1;
  544.     return;
  545.  
  546. # ........................................................................................
  547. #message that Indy pushed the block onto the elevator
  548. user5:
  549.     SetHintSolved(hint27);
  550.     return;
  551.  
  552. # ........................................................................................
  553. # Message that indy placed eye in floor socket
  554. user6:
  555. #    DEBUGPRINT("placed eye, solved hint 51");    
  556.     SetHintSolved(hint51);
  557.     return;
  558.  
  559. #message that Indy pushed LabTopBlocks into place
  560. #if (blockCorrect == 0)
  561. #{
  562. #    SetHintSolved(hint34);
  563. #}
  564. #if (blockCorrect == 1)
  565. #{
  566. #    SetHintSolved(hint35);
  567. #}
  568. #if (blockCorrect == 2)
  569. #{
  570. #    SetHintSolved(hint36);
  571. #}
  572. #blockCorrect = blockCorrect + 1;
  573. #return;
  574.  
  575. # ........................................................................................
  576. user7:
  577. #message that Indy pulled the block off of the elevator
  578. SetHintSolved(hint45);
  579. return;
  580.  
  581.  
  582. # ........................................................................................
  583. end
  584.  
  585.